# Procedure
 
### Step 1: Preparation
1. Download the code from "..."
2. Download and install Ollama from https://ollama.com/download
3. Activate Ollama locally or on a server with the command *ollama start*. You can now call its API.
4. Models used are codellama, codegemma:instruct and mistral:instruct. Download them by using *ollama pull <model>*. Ollama is now ready.
5. Make sure that python is installed on your system. You can check that with *python --version*
6. Make sure that pip is installed on your system. You can check that with *pip --version*. If not, install it by running *python -m ensurepip --upgrade*.
7. (Optional) Create and activate a virtual environment to keep dependencies isolated. See https://docs.python.org/3/library/venv.html for more information.
8. Install the dependencies: *pip install requests progressbar2 geojson openpyxl*
 
### Step 2: Running the test
9. Set the path 'test_folder' in the code to './boundaries-tests' to run tests whose number of vertices increase from 5 to 21 or to './boundaries-tests/strategy_1_b' to use only rectangular fields.
10. Start your desired test with the command *python test_model.py "<model>" "<learning_type>"*. Possible values for *learning_type* are 'zero-shot', 'few-shot-1', 'few-shot-2' and 'few-shot-3'.
The program creates a file for each test if it does not already exist. A request is then sent to Ollama's API, which contains the model name, prompt and format. We disabled streaming to preserve the result as a whole. If no errors occurred during the transfer, the response is written to the file and saved. The test results will be stored in */<model>/<learning_type>*.
Each call starts a hundred tests. This will take some time depending on the performance of your machine.
 
### Step 3: Evaluation
 
11. Start the evaluation with *python evaluate_responses.py "<model>" "<learning_type>"*.
First, the test results are automatically checked for validity of the geojson syntax by *geojson_validation.py*. This also includes that the first and last coordinates have to be identical, so that the field is complete. If the syntax is correct, the coordinates are compared with their expected values. These can be found in the 'boundaries-expected-results' folder.
The results are documented in the file 'evaluation.xlsx'. All tests are marked either -1 (is NOT a valid GEOJSON), 0 (only syntactically valid) or 1 (semantically correct). We recommend to double check the tests marked as 'semantically correct' manually to find any other problems regarding e.g. the id or the date.

### Threats to validity 

External validity: The results about effectiveness of LLMs to implement adapters at runtime are limited to the particular case of agricultural field boundaries. 

Internal validity: As we used synthetic data to perform our study, the research on the topic of LLM-based adapter would benefit from reproduced studies based on real data, especially considering the differences between iterations 1 and 2, for iteration 2 assume roughly rectangular fields as representatives of this particular type of data. Furthermore, we have only experimented with one unknown data format (i.e., John
Deere’s field boundaries) so far. 

Construct validity: As prompting strategies can make a difference when interacting with LLMs [12], the prompt templates we created – especially concerning the few-prompt approaches – may have limited the effectiveness of
the models in fulfilling the task.

Conclusion validity: For iteration 2, we assumed that fewer vertices could be a good proxy for near-rectangular field geometries.